package com.myblog.mapper;

import com.myblog.pojo.Diary;
import org.apache.ibatis.annotations.Result;
import org.apache.ibatis.annotations.Results;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
public interface Diarymapper {

    @Select("SELECT * FROM diary ORDER BY diary.datatime DESC")
    @Results(
            value = {
                    @Result(property = "id",column = "id"),
                    @Result(property = "logDescribe",column = "log_describe"),
                    @Result(property = "datatime",column = "datatime")
            }
    )
    public List<Diary> finddiary();
}
